import { stringify } from 'qs';
import request from '@/utils/request';

import webpath from '@/utils/webpath';

export async function deleteByPrimaryKeyForProResAuth(params = {}) {
    return request(`/${webpath}/web/api/service/proresauth/delete?${stringify(params)}`);
}


export async function selectByPrimaryKeyForProResAuth(params = {}) {
    return request(`/${webpath}/web/api/service/proresauth/get?${stringify(params)}`);
}


export async function insertForProResAuth(params = {}) {
    return request(`/${webpath}/web/api/service/proresauth/insert`, {
        method: 'POST',
        data: {
            ...params,
            method: 'insert',
        },
    });
}


export async function updateForProResAuth(params = {}) {
    return request(`/${webpath}/web/api/service/proresauth/update`, {
        method: 'POST',
        data: {
            ...params,
            method: 'update',
        },
    });
}


export async function deleteByMapForProResAuth(params = {}) {
    return request(`/${webpath}/web/api/service/proresauth/deleteByMap`, {
        method: 'POST',
        data: {
            ...params,
            method: 'delete',
        },
    });
}


export async function updateByMapForProResAuth(params = {}) {
    return request(`/${webpath}/web/api/service/proresauth/updateByMap`, {
        method: 'POST',
        data: {
            ...params,
            method: 'update',
        },
    });
}


export async function getOneForProResAuth(params = {}) {
    return request(`/${webpath}/web/api/service/proresauth/getOne`, {
        method: 'POST',
        data: {
            ...params,
            method: 'fetch',
        },
    });
}



export async function getAllForProSystem(params = {}) {
    return request(`/${webpath}/web/api/service/proresauth/getAll`, {
        method: 'POST',
        data: {
            ...params,
            method: 'fetch',
        },
    });
}


export async function queryPageForProSystem(params = {}) {
    return request(`/${webpath}/web/api/service/proresauth/queryPage`, {
        method: 'POST',
        data: {
            ...params,
            method: 'fetch',
        },
    });
}


export async function countForProResAuth(params = {}) {
    return request(`/${webpath}/web/api/service/proresauth/count`, {
        method: 'POST',
        data: {
            ...params,
            method: 'fetch',
        },
    });
}

export async function insertBatchForProResAuth(params = {}) {
    return request(`/${webpath}/web/api/service/proresauth/insertBatch`, {
        method: 'POST',
        data: {
            ...params,
            method: 'insert',
        },
    });
}


export async function deleteBatchForProResAuth(params = {}) {
    return request(`/${webpath}/web/api/service/proresauth/deleteBatch`, {
        method: 'POST',
        data: {
            ...params,
            method: 'delete',
        },
    });
}


export async function updateBatchForProResAuth(params = {}) {
    return request(`/${webpath}/web/api/service/proresauth/updateBatch`, {
        method: 'POST',
        data: {
            ...params,
            method: 'update',
        },
    });
}
export async function getAllUser(params = {}) {
    return request(`/${webpath}/web/api/service/proresauth/getAllUser`, {
        method: 'POST',
        data: {
            ...params,
            method: 'delete',
        },
    });
}


export async function queryPageForProUser(params = {}) {
    return request(`/${webpath}/web/api/service/proresauth/queryPageForProUser`, {
        method: 'POST',
        data: {
            ...params,
            method: 'update',
        },
    });
}